<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<input type="text" name="" id="input1" value="" /><br />
		<input type="text" name="" id="input2" value="" /><br />
		<script type="text/javascript">
			input.onkeydown = function(e)
			{
				console.log("按下")
				console.log(e.key);
				console.log(e.keyCode);
			}
			input.onkeyup = function(e)
			{
				console.log("抬起")
				console.log(e.key);
				console.log(e.keyCode);
			}
			input.onkeypres s = function(e)
			{
				console.log("按下")
				console.log(e.key);
				console.log(e.keyCode);
			}
		</script>
	</body>
</html>
